package lac.serviceuint.cfg;

import java.io.Serializable;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import com.thoughtworks.xstream.annotations.XStreamOmitField;

@XStreamAlias("param")
public class MethodParam implements Serializable{

	
	/**
	 * 
	 */
	private static final long serialVersionUID = -7060427543560001553L;
	@XStreamAsAttribute
	private String id;
	@XStreamAsAttribute
	private String name;
	@XStreamAsAttribute
	private String javaClassType;
	@XStreamAsAttribute
	private Integer index;
	@XStreamAsAttribute
	private String defalutValue;
	@XStreamAsAttribute
	private Boolean restDefalutValue =  true;
	@XStreamOmitField
	private Method method;
	
	
	public MethodParam() {
		// TODO Auto-generated constructor stub
	}
	
	public MethodParam(String name,Integer index) {
		super();
		this.name = name;
		this.index = index;
	}
	
	public MethodParam(String name, String javaClassType) {
		super();
		this.name = name;
		this.javaClassType = javaClassType;
	}
	
	public MethodParam(String name, String javaClassType, String defalutValue) {
		super();
		this.name = name;
		this.javaClassType = javaClassType;
		this.defalutValue = defalutValue;
	}
	
	public MethodParam(String name, String javaClassType, String defalutValue,Boolean restDefalutValue) {
		super();
		this.name = name;
		this.javaClassType = javaClassType;
		this.defalutValue = defalutValue;
		this.restDefalutValue = restDefalutValue;
	}

	public MethodParam(String name, String javaClassType, Integer index, String defalutValue) {
		super();
		this.name = name;
		this.javaClassType = javaClassType;
		this.index = index;
		this.defalutValue = defalutValue;
	}
	
	public MethodParam(String name, String javaClassType, Integer index, String defalutValue,Boolean restDefalutValue) {
		super();
		this.name = name;
		this.javaClassType = javaClassType;
		this.index = index;
		this.defalutValue = defalutValue;
		this.restDefalutValue = restDefalutValue;
	}



	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getJavaClassType() {
		return javaClassType;
	}

	public void setJavaClassType(String javaClassType) {
		this.javaClassType = javaClassType;
	}

	public Integer getIndex() {
		return index;
	}

	public void setIndex(Integer index) {
		this.index = index;
	}

	public String getDefalutValue() {
		return defalutValue;
	}

	public void setDefalutValue(String defalutValue) {
		this.defalutValue = defalutValue;
	}

	public Method getMethod() {
		return method;
	}

	public void setMethod(Method method) {
		this.method = method;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Boolean getRestDefalutValue() {
		return restDefalutValue;
	}

	public void setRestDefalutValue(Boolean restDefalutValue) {
		this.restDefalutValue = restDefalutValue;
	}

	
	

}
